<template>
	<div id="news_detail">
		<div id="app">
			<div class="cover" :style="{'background-image':'url(https://yo.docshare.org.cn'+news.newsbackground+')'}">
				<div  class="title">
					<p>{{news.newstitle}}</p>
					<span>{{news.newsdate}}</span>
					<div class="clear"></div>
				</div>
				<div class="read">
					<img class="eye " src="https://yo.docshare.org.cn/static/images/read.png">
					<span>999+</span>
				</div>
			</div>
			<div class="fill">
				<div class="con">
					<p>
						{{news.newscontent}}————{{news.name}}
						</p>
					<img :src="'https://yo.docshare.org.cn'+news.newscontentphoto">
				</div>
			</div>
		</div>
	</div>
</template>

<script>
	import config from '@/config'
	export default {
		data() {
			return {
			usr: '',
			uni,
			config,
			news: {},
			vid:'',
			}
		},
		onLoad(option) {
			if(option.id){
				this.vid = option.id;
			}
			var that = this;
			uni.request({
				url:`${config.baseUrl}/news/one?id=${that.vid}&token=${uni.getStorageSync('token')}`,
				method:"GET",
				success(r) {
					if (r.data.succ) {
						that.news = r.data.data;
					} else {
						
					}
				},
					complete(res){
						if(res.data && res.data.msg){
							uni.showToast({
								icon:'none',
								title:res.data.msg
							})
						}
					},
			})
		}
	}
</script>

<style>
</style>
